﻿<%@ Page Title="" Language="C#" MasterPageFile="~/FilStartUps.Master" AutoEventWireup="true"
    CodeBehind="AdminReport.aspx.cs" Inherits="FilStartUps.Admin.AdminReport" %>

<%@ Register Src="../Controls/FilStartUps_PageNav.ascx" TagName="FilStartUps_PageNav"
    TagPrefix="uc1" %>
<%@ Import Namespace="FilStartUps.Helper" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainNav" runat="server">
    <uc1:FilStartUps_PageNav ID="FilStartUps_PageNav1" runat="server" />
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="BodyHolder" runat="server">
    <ajaxToolkit:TabContainer Width="960px" ID="TabContainer1" runat="server" ActiveTabIndex="0"
        OnDemand="true" AutoPostBack="false" TabStripPlacement="Top" ScrollBars="None"
        UseVerticalStripPlacement="false">
        <ajaxToolkit:TabPanel ID="tabforum" runat="server" HeaderText="<b>Forum Report</b>"
            Enabled="true" ScrollBars="Auto" OnDemandMode="Once">
            <ContentTemplate>
                <div style="padding-top: 30px; padding-bottom: 50px">`
                    <br />
                    <asp:ScriptManager ID="ScriptManager1" runat="server">
                    </asp:ScriptManager>
                    <asp:UpdatePanel ID="forumpanel" runat="server">
                        <ContentTemplate>
                            <asp:DataGrid runat="server" ID="dgreport" AllowPaging="true" AutoGenerateColumns="false"
                                Width="100%" BorderWidth="0" CellPadding="0" CellSpacing="0" PageSize="10" OnItemCommand="dgreport_ItemCommand">
                                <PagerStyle Mode="NextPrev" HorizontalAlign="Right" CssClass="pageLink" BackColor="#ffffff"
                                    NextPageText="Next &gt;" PrevPageText="&lt; Prev" />
                                <SelectedItemStyle CssClass="bglight" />
                                <AlternatingItemStyle CssClass="bgdark" />
                                <ItemStyle CssClass="bglight" />
                                <Columns>
                                    <asp:TemplateColumn>
                                        <HeaderStyle CssClass="listheader" />
                                        <HeaderTemplate>
                                            Thread</HeaderTemplate>
                                        <ItemStyle CssClass="listColumnText" />
                                        <ItemTemplate>
                                            <asp:Label runat="server" ID="lbforumid" Text='<%# DataBinder.Eval(Container.DataItem, "forumthreadidPK") %>'
                                                Visible="false">
                                            </asp:Label>
                                            <asp:LinkButton runat="server" ID="hlforum" CommandName="ForumThread" Text='<%# DataBinder.Eval(Container.DataItem, "forumtitle") %>'></asp:LinkButton>
                                            <br />
                                        </ItemTemplate>
                                    </asp:TemplateColumn>
                                    <asp:TemplateColumn>
                                        <HeaderStyle CssClass="listheader" />
                                        <HeaderTemplate>
                                            Replies</HeaderTemplate>
                                        <ItemStyle CssClass="listColumnText" />
                                        <ItemTemplate>
                                            <div style="white-space: nowrap">
                                                <asp:Literal runat="server" Mode="PassThrough" ID="ltdescription_" Text='<%# HtmlRemoval.StripTagsCharArray(truncate(DataBinder.Eval(Container.DataItem, "replydescription").ToString())) %>'></asp:Literal>
                                            </div>
                                        </ItemTemplate>
                                    </asp:TemplateColumn>
                                    <asp:TemplateColumn>
                                        <HeaderStyle CssClass="listheader" />
                                        <HeaderTemplate>
                                            ReportMessage</HeaderTemplate>
                                        <ItemStyle CssClass="listColumnText" />
                                        <ItemTemplate>
                                            <div style="white-space: nowrap">
                                                <asp:Literal runat="server" Mode="PassThrough" ID="ltdescription" Text='<%# HtmlRemoval.StripTagsCharArray(truncate(DataBinder.Eval(Container.DataItem, "reportdescription").ToString())) %>'></asp:Literal>
                                            </div>
                                        </ItemTemplate>
                                    </asp:TemplateColumn>
                                    <asp:TemplateColumn>
                                        <HeaderStyle Width="20%" CssClass="listheader" />
                                        <HeaderTemplate>
                                            Date Reported</HeaderTemplate>
                                        <ItemStyle CssClass="listColumnText" />
                                        <ItemTemplate>
                                            <asp:Label runat="server" ID="datereported" Text='<%# DataBinder.Eval(Container.DataItem, "datereported" ) %>'></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateColumn>
                                    <asp:TemplateColumn>
                                        <HeaderStyle Width="10%" HorizontalAlign="center" CssClass="listheader" />
                                        <HeaderTemplate>
                                            Action</HeaderTemplate>
                                        <ItemStyle HorizontalAlign="center" CssClass="listColumnText" />
                                        <ItemTemplate>
                                            <asp:ImageButton ID="deleter" ImageUrl="../Content/images/icon_delete.gif" CausesValidation="False"
                                                AlternateText="Delete" ImageAlign="absmiddle" BorderStyle="None" Width="19" Height="19"
                                                CommandArgument='<%# DataBinder.Eval(Container.DataItem, "forumreplyid") %>'
                                                CommandName="SelectRow" runat="server" />
                                            <%--  
                             OnCommand="deleter_update"--%>
                                        </ItemTemplate>
                                    </asp:TemplateColumn>
                                </Columns>
                            </asp:DataGrid>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </div>
            </ContentTemplate>
        </ajaxToolkit:TabPanel>
        <!-- MEMBER --->
        <ajaxToolkit:TabPanel runat="server" ID="tabuser" HeaderText=" <b>List of User</b>"
            Enabled="true" ScrollBars="Auto" OnDemandMode="Once">
            <ContentTemplate>
                <div style="padding: 20px 0px 20px 0px">
                    <asp:UpdatePanel ID="userpanel" runat="server">
                        <ContentTemplate>
                            Search Member:<asp:TextBox runat="server" ID="txtsearchmember" Width="150px">
                            </asp:TextBox>
                            <asp:Button CssClass="btn" ID="btnsearchmember" runat="server" Text="Search" OnClick="btnsearchmember_Click" />
                            <%--  OnItemCommand="dgmember_ItemCommand"--%>
                            <asp:DataGrid runat="server" ID="dgmembers" AllowPaging="true" AutoGenerateColumns="false"
                                Width="100%" BorderWidth="0" CellPadding="0" CellSpacing="0" PageSize="10">
                                <PagerStyle Mode="NextPrev" HorizontalAlign="Right" CssClass="pageLink" BackColor="#ffffff"
                                    NextPageText="Next &gt;" PrevPageText="&lt; Prev" />
                                <SelectedItemStyle CssClass="bglight" />
                                <AlternatingItemStyle CssClass="bgdark" />
                                <ItemStyle CssClass="bglight" />
                                <Columns>
                                    <asp:TemplateColumn>
                                        <HeaderStyle CssClass="listheader" />
                                        <HeaderTemplate>
                                            Member</HeaderTemplate>
                                        <ItemStyle CssClass="listColumnText" />
                                        <ItemTemplate>
                                            <asp:Label runat="server" ID="lbforumid" Text='<%# DataBinder.Eval(Container.DataItem, "memberidPK") %>'
                                                Visible="false">
                                            </asp:Label>
                                            <asp:Image runat="server" Width="120px" Height="80px" ID="memberprofilepic" ImageUrl='<%# "../FilStartUps.ashx?id=" + Eval("memberidPK") + "&cat=" + 1 %>' />
                                            <br />
                                        </ItemTemplate>
                                    </asp:TemplateColumn>
                                    <asp:TemplateColumn>
                                        <HeaderStyle CssClass="listheader" />
                                        <HeaderTemplate>
                                            Email</HeaderTemplate>
                                        <ItemStyle CssClass="listColumnText" />
                                        <ItemTemplate>
                                            <div style="white-space: nowrap">
                                                <asp:Literal runat="server" Mode="PassThrough" ID="ltdescription_" Text='<%# DataBinder.Eval(Container.DataItem, "emailaddress") %>'></asp:Literal>
                                            </div>
                                        </ItemTemplate>
                                    </asp:TemplateColumn>
                                    <asp:TemplateColumn>
                                        <HeaderStyle CssClass="listheader" />
                                        <HeaderTemplate>
                                            Total Post</HeaderTemplate>
                                        <ItemStyle CssClass="listColumnText" />
                                        <ItemTemplate>
                                            <div style="white-space: nowrap">
                                                <%-- <asp:Literal runat="server" Mode="PassThrough" ID="ltdescription" Text='<%# DataBinder.Eval(Container.DataItem, "totalpost") %>'></asp:Literal>--%>
                                            </div>
                                        </ItemTemplate>
                                    </asp:TemplateColumn>
                                    <asp:TemplateColumn>
                                        <HeaderStyle Width="20%" CssClass="listheader" />
                                        <HeaderTemplate>
                                            Date Joined</HeaderTemplate>
                                        <ItemStyle CssClass="listColumnText" />
                                        <ItemTemplate>
                                            <asp:Label runat="server" ID="datereported" Text='<%# DataBinder.Eval(Container.DataItem, "datejoined" ) %>'></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateColumn>
                                    <asp:TemplateColumn>
                                        <HeaderStyle Width="10%" HorizontalAlign="center" CssClass="listheader" />
                                        <HeaderTemplate>
                                            Action</HeaderTemplate>
                                        <ItemStyle HorizontalAlign="center" CssClass="listColumnText" />
                                        <ItemTemplate>
                                            <asp:ImageButton ID="deleter" ImageUrl="../Content/images/icon_delete.gif" CausesValidation="False"
                                                AlternateText="Delete" ImageAlign="absmiddle" BorderStyle="None" Width="19" Height="19"
                                                CommandArgument='<%# DataBinder.Eval(Container.DataItem, "memberidPK") %>' CommandName="SelectRow"
                                                runat="server" />
                                            <%--  
                             OnCommand="deleter_update"--%>
                                        </ItemTemplate>
                                    </asp:TemplateColumn>
                                </Columns>
                            </asp:DataGrid>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </div>
            </ContentTemplate>
        </ajaxToolkit:TabPanel>
    </ajaxToolkit:TabContainer>
</asp:Content>
